home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / uastrfnc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  2.3 KB  |  89 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1994-1997.
  5. //
  6. //  File:       uastrfnc.h
  7. //
  8. //  Contents:   Unaligned UNICODE lstr functions for MIPS, PPC, ALPHA, ...
  9. //
  10. //  Classes:
  11. //
  12. //  Functions:
  13. //
  14. //
  15. //--------------------------------------------------------------------------
  16.  
  17. // NOTE: This file assumes it is included from shellprv.h
  18.  
  19. #ifndef _UASTRFNC_H_
  20. #define _UASTRFNC_H_
  21. #pragma option push -b
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. // If we are running on a platform that requires aligned data, we need
  28. // to provide custom string functions that can deal with unaligned
  29. // strings.  On other platforms, these call directly to the normal string
  30. // functions.
  31.  
  32. #ifndef _X86_
  33. #define ALIGNMENT_MACHINE
  34. #endif
  35.  
  36. #ifdef ALIGNMENT_MACHINE
  37.  
  38. UNALIGNED WCHAR * ualstrcpynW(UNALIGNED WCHAR * lpString1,
  39.                         UNALIGNED const WCHAR * lpString2,
  40.                       int iMaxLength);
  41.  
  42. int           ualstrcmpiW (UNALIGNED const WCHAR * dst,
  43.                    UNALIGNED const WCHAR * src);
  44.  
  45. int           ualstrcmpW  (UNALIGNED const WCHAR * src,
  46.                    UNALIGNED const WCHAR * dst);
  47.  
  48. size_t           ualstrlenW  (UNALIGNED const WCHAR * wcs);
  49.  
  50. UNALIGNED WCHAR * ualstrcpyW  (UNALIGNED WCHAR * dst,
  51.                    UNALIGNED const WCHAR * src);
  52.  
  53. #else
  54.  
  55. #define ualstrcpynW StrCpyNW     // lstrcpynW is stubbed out on Windows 95
  56. #define ualstrcmpiW StrCmpIW     // lstrcmpiW is stubbed out on Windows 95
  57. #define ualstrcmpW  StrCmpW      // lstrcmpW is stubbed out on Windows 95
  58. #define ualstrlenW  lstrlenW
  59. #define ualstrcpyW  StrCpyW      // lstrcpyW is stubbed out on Windows 95
  60.  
  61. #endif // ALIGNMENT_MACHINE
  62.  
  63. #define ualstrcpynA lstrcpynA
  64. #define ualstrcmpiA lstrcmpiA
  65. #define ualstrcmpA  lstrcmpA
  66. #define ualstrlenA  lstrlenA
  67. #define ualstrcpyA  lstrcpyA
  68.  
  69. #ifdef UNICODE
  70. #define ualstrcpyn ualstrcpynW
  71. #define ualstrcmpi ualstrcmpiW
  72. #define ualstrcmp  ualstrcmpW
  73. #define ualstrlen  ualstrlenW
  74. #define ualstrcpy  ualstrcpyW
  75. #else
  76. #define ualstrcpyn ualstrcpynA
  77. #define ualstrcmpi ualstrcmpiA
  78. #define ualstrcmp  ualstrcmpA
  79. #define ualstrlen  ualstrlenA
  80. #define ualstrcpy  ualstrcpyA
  81. #endif
  82.  
  83. #ifdef __cplusplus
  84. }       // extern "C"
  85. #endif
  86.  
  87. #pragma option pop
  88. #endif // _UASTRFNC_H_
  89.